home *** CD-ROM | disk | FTP | other *** search
- @echo off
-
- if not exist %_DRIVER% goto ENoDrv
-
- REM Remove the potential backup file (second installation)
- if not exist %_DRVDIR%\%_DRVBAK% goto LNext1
- del %_DRVDIR%\%_DRVBAK% > NUL
- if not errorlevel 0 goto ENoDel
-
- REM Rename the current driver so that we can copy the new one.
- :LNext1
- if not exist %_DRVDIR%\%_DRIVER% goto LNext2
- ren %_DRVDIR%\%_DRIVER% %_DRVBAK% > NUL
- if not errorlevel 0 goto ENoRename
-
- :LNext2
- copy %_DRIVER% %_DRVDIR%\%_DRIVER% > NUL
- if not errorlevel 0 goto ECantCopy
-
-
- REM We successfully installed the file.
- echo %_DRIVER% driver copied.
- goto End
-
- :ENoDel
- echo ERROR: Cannot delete the %_DRVBAK% file.
- goto End
-
- :ENoRename
- echo ERROR: Cannot rename the %_DRIVER% file.
- goto End
-
- :ENoDrv
- echo ERROR: Cannot find the source %_DRIVER% driver
- goto End
-
- :ECantCopy
- echo ERROR: Unable to copy the %_DRIVER% driver
- goto End
-
- :End
-